//
//  FileManageTool.swift
//  WriteToLocal
//
//  Created by 郑东喜 on 2017/3/4.
//  Copyright © 2017年 郑东喜. All rights reserved.
//

import UIKit

class FileManageTool: NSObject {
    /// 文件执行权限
    class func fileAuthStatus(filePath : String) -> Void {
        let manager = FileManager.default
        
        let readable = manager.isReadableFile(atPath: filePath)
        print("\((#file as NSString).lastPathComponent):(\(#line))\n","可读: \(readable)")
        
        let writeable = manager.isWritableFile(atPath: filePath)
        print("\((#file as NSString).lastPathComponent):(\(#line))\n","可写: \(writeable)")

        let executable = manager.isExecutableFile(atPath: filePath)
        print("\((#file as NSString).lastPathComponent):(\(#line))\n","可执行: \(executable)")
        
        let deleteable = manager.isDeletableFile(atPath: filePath)
        print("\((#file as NSString).lastPathComponent):(\(#line))\n","可删除: \(deleteable)")
    }
}

